package com.erlinyou.im.model.group;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.erlinyou.im.model.base.AbstractDO;
@Entity
@Table(name = "tgroup")
public class Group extends AbstractDO{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	/**
	 * uuid 字符串主键
	 */
	private String uid;
	/**
	 * 名称
	 */
	private String name;
	/**
	 * 创建时间
	 */
	private Long ct;
	/**
	 * 群图片
	 */
	private String image;
	/**
	 * 创建人
	 */
	private Long owner;
	/**
	 * 群组类型： 
	 *  1 为群聊
	 *	2 为世界callcenter
	 *	3 为国家callcenter
	 *	4 为自定义callcenter
	 * 	5 为客服
	 */
	private int gtype;
	
	private String poiId;
	
	private int flag;
	
	@OneToMany(fetch=FetchType.EAGER)
	@JoinColumn(name = "groupid", referencedColumnName = "id")
	private List<Groupmembers> groupmembers = new ArrayList<>();

	
	

	public int getFlag() {
		return flag;
	}


	public void setFlag(int flag) {
		this.flag = flag;
	}


	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public String getUid() {
		return uid;
	}


	public void setUid(String uid) {
		this.uid = uid;
	}


	public String getName() {
		return name;
	}


	public String getPoiId() {
		return poiId;
	}


	public void setPoiId(String poiId) {
		this.poiId = poiId;
	}


	public void setName(String name) {
		this.name = name;
	}


	public Long getCt() {
		return ct;
	}


	public void setCt(Long ct) {
		this.ct = ct;
	}


	public String getImage() {
		return image;
	}


	public void setImage(String image) {
		this.image = image;
	}


	public Long getOwner() {
		return owner;
	}


	public void setOwner(Long owner) {
		this.owner = owner;
	}


	public List<Groupmembers> getGroupmembers() {
		return groupmembers;
	}


	public void setGroupmembers(List<Groupmembers> groupmembers) {
		this.groupmembers = groupmembers;
	}


	public int getGtype() {
		return gtype;
	}


	public void setGtype(int gtype) {
		this.gtype = gtype;
	}
	
	
}
